import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {
  const count = ref("")
  const doubleCount = computed(() => count.value * 2)
  function increment() {
    count.value++
    localStorage.setItem("token", count.value)

  }
  function fn() {
    count.value = localStorage.getItem("token")
  }
  return { count, doubleCount, increment, fn }
})
export default useCounterStore

